import 'package:flutter_syt/datas/number_extension.dart';

class StationItem {
  late String pushlish_user_id;
  late String id;
  late String uid;
  late String title;
  late String content;
  late String created_at;
  late String updated_at;
  late int is_read;
  late String relation_id;
  late String type;
  late String push_method;
  late String push_ids;
  late String account_logo;
  late String account_name;

  StationItem(Map<String, dynamic> json) {
    this.pushlish_user_id = "${json["publish_user_id"]}";
    this.id = "${json["id"]}";
    this.uid = "${json["uid"]}";
    this.title = "${json["title"]}";
    this.content = "${json["content"]}";
    this.created_at = "${json["created_at"]}";
    this.updated_at = "${json["updated_at"]}";
    this.is_read = parseInt(json["is_read"]);
    this.relation_id = "${json["relation_id"]}";
    this.type = "${json["type"]}";
    this.push_method = "${json["push_method"]}";
    this.push_ids = "${json["push_ids"]}";
    this.account_logo = "${json["account_logo"]}";
    this.account_name = "${json["account_name"]}";
  }
  Map<String, dynamic> get json {
    var result = Map<String, dynamic>();
    result["pushlish_user_id"] = this.pushlish_user_id;
    result["id"] = this.id;
    result["uid"] = this.uid;
    result["title"] = this.title;
    result["content"] = this.content;
    result["created_at"] = this.created_at;
    result["updated_at"] = this.updated_at;
    result["is_read"] = this.is_read;
    result["relation_id"] = this.relation_id;
    result["type"] = this.type;
    result["push_method"] = this.push_method;
    result["push_ids"] = this.push_ids;
    result["account_logo"] = this.account_logo;
    result["account_name"] = this.account_name;
    return result;
  }
}

class StationSubItem {
  late String id;
  late String uid;
  late String title;
  late String content;
  late String created_at;
  late String updated_at;
  late int is_read;
  late String relation_id;
  late String type;
  late String push_method;
  late String push_ids;
  late String account_logo;
  late String account_name;

  late String jump_target;
  late String url;

  StationSubItem(Map<String, dynamic> json) {
    this.id = "${json["id"]}";
    this.uid = "${json["uid"]}";
    this.title = "${json["title"]}";
    this.content = "${json["content"]}";
    this.created_at = "${json["created_at"]}";
    this.updated_at = "${json["updated_at"]}";
    this.is_read = parseInt(json["is_read"]);
    this.relation_id = "${json["relation_id"]}";
    this.type = "${json["type"]}";
    this.push_method = "${json["push_method"]}";
    this.push_ids = "${json["push_ids"]}";
    this.account_logo = "${json["account_logo"]}";
    this.account_name = "${json["account_name"]}";

    this.jump_target = "${json["jump_target"]}";
    this.url = "${json["url"]}";
  }
  Map<String, dynamic> get json {
    var result = Map<String, dynamic>();
    result["id"] = this.id;
    result["uid"] = this.uid;
    result["title"] = this.title;
    result["content"] = this.content;
    result["created_at"] = this.created_at;
    result["updated_at"] = this.updated_at;
    result["is_read"] = this.is_read;
    result["relation_id"] = this.relation_id;
    result["type"] = this.type;
    result["push_method"] = this.push_method;
    result["push_ids"] = this.push_ids;
    result["account_logo"] = this.account_logo;
    result["account_name"] = this.account_name;
    result["jump_target"] = this.jump_target;
    result["url"] = this.url;
    return result;
  }
}
